/*
 * Copyright (c) 2017. 深圳一七网络科技. All rights reserved.
 */

package com.fenxiangle.yueding.framework.api;

import com.fenxiangle.yueding.entity.bo.AliPayBo;
import com.fenxiangle.yueding.entity.bo.CommentBo;
import com.fenxiangle.yueding.entity.bo.DeleteBo;
import com.fenxiangle.yueding.entity.bo.ExtensionBo;
import com.fenxiangle.yueding.entity.bo.FoucsBo;
import com.fenxiangle.yueding.entity.bo.IDCardBo;
import com.fenxiangle.yueding.entity.bo.IdentificationBo;
import com.fenxiangle.yueding.entity.bo.LoginPram;
import com.fenxiangle.yueding.entity.bo.MyAccountBo;
import com.fenxiangle.yueding.entity.bo.OccupationBo;
import com.fenxiangle.yueding.entity.bo.OrderBo;
import com.fenxiangle.yueding.entity.bo.Page2Bo;
import com.fenxiangle.yueding.entity.bo.PageBo;
import com.fenxiangle.yueding.entity.bo.PayBo;
import com.fenxiangle.yueding.entity.bo.PublishBo;
import com.fenxiangle.yueding.entity.bo.PublishDemandBo;
import com.fenxiangle.yueding.entity.bo.RatingBo;
import com.fenxiangle.yueding.entity.bo.TeamBo;
import com.fenxiangle.yueding.entity.bo.TimeValueBo;
import com.fenxiangle.yueding.entity.bo.TranscctionBo;
import com.fenxiangle.yueding.entity.bo.UserCenterBo;
import com.fenxiangle.yueding.entity.bo.UserImageBo;
import com.suozhang.framework.entity.bo.Result;

import com.suozhang.framework.entity.bo.UserInfoBo;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.*;


public interface UserApi {
    /**
     * 上传头像
     */
    @Multipart
    @POST("v1/userData/upload_user_head.shtml")
    Observable<Result<String>> uploadUserHead(@Part MultipartBody.Part userHead);

    /**
     * 获取用户主页数据
     */
    @POST("v1/userData/user_data.shtml")
    Observable<Result<UserCenterBo>> getUserCenterData();

    /**
     * 获取用户主页数据
     */
    @POST("v1/userData/other_user_data.shtml")
    Observable<Result<UserCenterBo>> getOtherUserCenterData(@Body FoucsBo foucsBo);

    /**
     * 用户登录
     */
    @POST("v1/login/user_login.shtml")
    Observable<Result<UserInfoBo>> userLogin(@Body LoginPram registerBo);

    /**
     * 第三方登录
     */
    @POST("v1/login/register_by_third.shtml")
    Observable<Result<UserInfoBo>> userThirdLogin(@Body LoginPram registerBo);

    /**
     * 第三方登录绑定手机号
     */
    @POST("v1/login/binding_phone.shtml")
    Observable<Result<UserInfoBo>> bindPhone(@Body LoginPram registerBo);

    /**
     * 重置密码
     */
    @POST("v1/login/resetting_password.shtml")
    Observable<Result<UserInfoBo>> userResetPwd(@Body UserInfoBo registerBo);

    /**
     * 发送验证码
     **/

    @POST("v1/login/getCode.shtml")
    Observable<Result<LoginPram>> sendCode(@Body LoginPram registerBo);

    /**
     * 绑定推荐人
     */
    @POST("v1/login/binding_referee.shtml")
    Observable<Result<String>> bindingReferee(@Body LoginPram registerBo);

    /**
     * 身份认证(达人)
     */
    @Multipart
    @POST("v1/authentication/add_basic_authentication.shtml")
    Observable<Result<String>> add_basic_authentication(@PartMap() Map<String, RequestBody> maps);


    /**
     * 身份认证(查询)
     */

    @GET("v1/authentication/select_authentication_data.shtml")
    Observable<Result<IdentificationBo>> select_authentication_data(@Query("flag") String flag);

    /**
     * 身份认证(老板)
     */
    @Multipart
    @POST("v1/authentication/add_boss_authentication.shtml")
    Observable<Result<String>> add_boss_authentication(@PartMap() Map<String, RequestBody> maps);

    /**
     * 推广中心个人主页
     */
    @POST("v1/assets/user_Extension_Center.shtml")
    Observable<Result<ExtensionBo>> user_Extension_Center();

    /**
     * 充值服务
     */
    @POST("v1/assets/recharge_member.shtml")
    Observable<Result<AliPayBo>> recharge_member(@Body RequestBody body);

    /**
     * 佣金提现
     */
    @POST("v1/assets/apply/withdraw/cash.shtml")
    Observable<Result<AliPayBo>> user_forward(@Body RequestBody body);

    /**
     * 是否设置支付密码
     */
    @POST("v1/assets/is_set_pwd.shtml")
    Observable<Result<String>> is_set_pwd();

    /**
     * 设置支付密码
     */
    @POST("v1/assets/user_payment_set.shtml")
    Observable<Result<String>> user_payment_set(@Body RequestBody body);

    /**
     * 上传视频
     */
    @Multipart
    @POST("v1/userData/upload_user_video.shtml")
    Observable<Result<String>> upload_user_video(@PartMap() Map<String, RequestBody> maps);

    //上传身份证照片
    @Multipart
    @POST("v1/authentication/add_uploadIDCard_authentication.shtml")
    Observable<Result<IDCardBo>> add_uploadIDCard_authentication(@Part MultipartBody.Part cardNegative, @Part MultipartBody.Part cardPositive); //上传商铺图片接口 接口

    //上传营业执照图片
    @Multipart
    @POST("v1/authentication/add_uploadBusinessLicense_authentication.shtml")
    Observable<Result<IDCardBo>> add_uploadBusinessLicense_authentication(@Part MultipartBody.Part businessLicense);

    /**
     * 关注
     */
    @POST("v1/user/attention/follow.shtml")
    Observable<Result<String>> attentionFollow(@Body FoucsBo filterBo);

    /**
     * 取消关注
     */
    @POST("v1/user/attention/unFollow.shtml")
    Observable<Result<String>> attentionUnFollow(@Body FoucsBo filterBo);

    /**
     * 修改昵称
     */

    @POST("v1/userData/upload_user_name.shtml")
    Observable<Result<String>> editNick(@Body FoucsBo filterBo);

    /**
     * 提交图片
     *
     * @param
     * @param
     */
    @Multipart
    @POST("v1/userData/upload_user_images.shtml")
    Observable<Result<String>> addImages(
            @Part List<MultipartBody.Part> bodyHashMap
    );


    /**
     * 修改昵称
     */

    @POST("v1/userData/isExtension.shtml")
    Observable<Result<String>> isExtension();


    /**
     * 可枪订单列表
     */

    @POST("v1/order/grab/sheet/list.shtml")
    Observable<Result<List<PublishDemandBo>>> sheetList(@Body PageBo publishBo);

    /**
     * 抢单
     */

    @POST("v1/order/grab/sheet.shtml")
    Observable<Result<UserImageBo>> sheet(@Body OrderBo publishBo);

    /**
     * 删除视频
     */


    @POST("v1/userData/deleteUserVideos.shtml")
    Observable<Result<String>> deleteVedio(@Body DeleteBo urls);

    /**
     * 删除视频
     */


    @POST("v1/userData/deleteUserImages.shtml")
    Observable<Result<String>> deletePhoto(@Body DeleteBo urls);

    /**
     * 选择抢单用户
     */


    @POST("v1/userData/getSubordinate.shtml")
    Observable<Result<List<TeamBo>>> getTeamList(@Body PageBo urls);


    /**
     * 团队成员
     */
    @POST("v1/order/grab/sheet/user/list.shtml")
    Observable<Result<List<TeamBo>>> getUserList(@Body PageBo urls);


    /**
     * 团队成员
     */
    @POST("v1/order/grab/sheet/choice/user.shtml")
    Observable<Result<OrderBo>> userStatus(@Body PageBo urls);

    /**
     * 确定抢单用户
     */
    @POST("v1/order/sure/grab/sheet/choice/user.shtml")
    Observable<Result<OrderBo>> submitUser(@Body PageBo urls);

    /**
     * 取消抢单用户
     */
    @POST("v1/order/cancel/grab/sheet.shtml")
    Observable<Result<UserImageBo>> cancelSheet(@Body PageBo urls);


    /**
     * 发布需求
     */

    @POST("v1/order/publish/general.shtml")
    Observable<Result<OrderBo>> publishDemand(@Body PublishBo publishBo);

    /**
     * 发布需求列表
     */

    @POST("v1/order/list/myPublish/general.shtml")
    Observable<Result<List<PublishDemandBo>>> getPublishDemandList(@Body PageBo publishBo);

    /**
     * 发布邀约
     */

    @POST("v1/order/publish/invite.shtml")
    Observable<Result<OrderBo>> publishinvite(@Body PublishBo publishBo);

    /**
     * 发布需求列表
     */

    @POST("v1/order/list/myPublish/invite.shtml")
    Observable<Result<List<PublishDemandBo>>> getPublishInviteList(@Body PageBo publishBo);

    /**
     * 我的接单
     */

    @POST("v1/order/list/generalOrInvite.shtml")
    Observable<Result<List<PublishDemandBo>>> getRecviceList(@Body PageBo publishBo);

    /**
     * 我的订单
     */

    @POST("v1/order/list/myAccept.shtml")
    Observable<Result<List<PublishDemandBo>>> getOrderList(@Body Page2Bo publishBo);

    /**
     * 订单支付
     */
    @POST("v1/order/pay.shtml")
    Observable<Result<AliPayBo>> getPayData(@Body PayBo publishBo);

    /**
     * 接受邀约单
     */
    @POST("v1/order/accept/invite.shtml")
    Observable<Result<String>> acceptInvite(@Body OrderBo publishBo);


    /**
     * 接受邀约单
     */
    @POST("v1/order/refuse/invite.shtml")
    Observable<Result<String>> refuseInvite(@Body OrderBo publishBo);

    /**
     * 修改时间值
     */


    @POST("v1/userData/editTimeValue.shtml")
    Observable<Result<String>> editTimeValue(@Body TimeValueBo publishBo);


    /**
     * 查看我的账户
     */
    @POST("v1/userData/myAccount.shtml")
    Observable<Result<MyAccountBo>> myAccount();

    /**
     * 信用金充值
     * */
    @POST("v1/assets/recharge.shtml")
    Observable<Result<AliPayBo>> rechargeCerdit(@Body PayBo payBo);

    /**
     * 取消交易
     * */


    @POST("v1/order/cancel.shtml")
    Observable<Result<String>> cancleInviteOrder(@Body OrderBo publishBo);

    /***
     * 获取评价
     * */

    @POST("v1/order/getScore.shtml")
    Observable<Result<List<CommentBo>>> getScore(@Body PageBo publishBo);

    /***
     * 确认订单
     * */

    @POST("v1/order/confirm/invite.shtml")
    Observable<Result<String>> confrimOrder(@Body OrderBo publishBo);

    /**
     * 评分
     * **/

    @POST("v1/order/giveAScore.shtml")
    Observable<Result<String>> toComment(@Body RequestBody publishBo);
    /**
     * 提醒确认
     * **/

    @POST("v1/order/confirmOrder.shtml")
    Observable<Result<PublishBo>> toTxComment(@Body OrderBo publishBo);


    /**
     *发起申诉
     * */
    @POST("v1/order/appeal.shtml")
    Observable<Result<String>> toweiqian(@Body OrderBo publishBo);

    @POST("v1/index/getOccupation.shtml")
    Observable<Result<List<OccupationBo>>> getOccupation();

    @POST("v1/transaction/details.shtml")
    Observable<Result<List<TranscctionBo>>> getTransaction();

    @POST("v1/transaction/commissionDetails.shtml")
    Observable<Result<List<TranscctionBo>>> getCommissionDetails();
}